home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / AppleEvents / Events / AEAttribute.cp next >
Text File  |  2000-06-23  |  618b  |  31 lines

  1. // AEAttribute.cp
  2.  
  3. #ifndef AEAttribute_h
  4. #include "AEAttribute.h"
  5. #endif
  6. #ifndef OSError_h
  7. #include "OSError.h"
  8. #endif
  9. #ifndef ConstData_h
  10. #include "ConstData.h"
  11. #endif
  12. #ifndef AEEvent_h
  13. #include "AEEvent.h"
  14. #endif
  15.  
  16. void AEAttribute::operator=( const AEDescriptor& in )
  17.   {
  18.     Assert( !Event().IsNull() );
  19.     ThrowOSError( AEPutAttributeDesc( &Event(), Key().Key(), &in ) );
  20.   }
  21.  
  22. void AEAttribute::Set( AEType type, ConstData data )
  23.   {
  24.     Assert( !Event().IsNull() );
  25.     ThrowOSError( AEPutAttributePtr( &Event(),
  26.                                                 Key().Key(),
  27.                                                 type.Type(),
  28.                                                 data.Start(),
  29.                                                 data.Length() ) );
  30.   }
  31.